Spring Framework, released almost two decades ago, has progressively established itself as a de facto standard for building Enterprise Java applications. With emerging trends of building applications by applying Microservices Architecture, Serverless with Cloud computing model, non-blocking architecture with Reactive architecture, Spring framework has been evolutionary in providing the support for modern architecture practices.
With Spring Framework as a foundational capability, the below visualization represents the ecosystem of Spring community-provided projects supporting diverse modern engineering architecture/design patterns with the following guidelines:
- Spring projects have been highlighted in the white boxes
- While projects have been aligned to diverse buckets, there are overlapping usage across different purposes (e.g. Spring Config can be used across different paradigms — Microservices, Reactive, Event-driven)
Microservices
- Spring Cloud: provides a suite of projects for building Microservices particularly Foundational Framework with Spring Boot, API Gateway with Spring Cloud Gateway, Service Discovery with Consul and Eureka, Circuit Breaker with Spring Cloud Circuit Breaker, Load Balancing with Spring Cloud Load Balancer, Distributed Tracing with Sleuth and Zipkin, Data Microservices with Spring Cloud Streams, and more.
- Spring Cloud Data Flow: supports building a data pipeline for a range of data processing use cases, from ETL to import/export, event streaming, and predictive analytics.
- Spring for GraphQL: built on GraphQL Java for supporting Spring applications.
- Spring HATEOS: for creating REST services following the HATEOAS principle.
- Spring REST Docs: for document RESTful services by combining hand-written documentation with auto-generated snippets.
Reactive Systems
- Project Reactor: A library built on principles of Reactive Streams
specification for building non-blocking applications on the JVM - Reactive Stack: Introduced in 2018 with Spring framework 5 to build non-blocking web applications. Spring WebFlow supports Reactive Streams back pressure and runs on such servers as Netty. Spring Data R2DBC (Reactive Relational Database Connectivity), a specification to integrate SQL databases using reactive drivers, is also part of the reactive suite.
Event-driven
- Spring Cloud Stream: a framework for building highly scalable event-driven microservices connected with shared messaging systems such as RabbitMQ, Apache Kafka, Amazon Kinesis, Google PubSub, Solace PubSub+, and more.
- Spring Cloud Function: to develop lightweight FaaS-based services as a subscriber of the events.
- Spring Cloud Data Flow: to develop, deploy, manage, and scale high-throughput streaming data pipelines across multiple cloud-native platforms.
Serverless
- Spring Cloud Function: It provides capabilities to build lightweight functions taking advantage of Serverless or FaaS platforms.
- Adapters are available for Cloud Services such as Amazon Lambda, Apache OpenWhisk, Microsoft Azure, and Project Riff.
Cloud Integration
- Spring Cloud AWS/Azure/GCP/Alibaba: eases the integration with hosted cloud-managed services with the respective providers.
- Spring Cloud for Cloud Foundry: easy to run Spring Cloud apps in Cloud Foundry (the Platform as a Service).
- Spring Cloud Connectors: designed for environmental awareness in cloud platforms such as Cloud Foundry and Heroku but not in maintenance mode in favor of the Java CFEnv project.
- Spring Cloud Kubernetes: build and run Spring Cloud applications on Kubernetes (not necessarily to run in K8S but provides abstractions such as load application properties from Kubernetes ConfigMaps and Secrets, Discovery Client implementation that resolves service names to Kubernetes Services).
- Spring Cloud Consul: provides Consul integrations for Spring Boot apps through autoconfiguration.
- Spring Cloud Skipper: a tool that allows you to discover Spring Boot applications and manage their lifecycle on multiple Cloud Platforms.
- Spring Cloud Cluster: offers a set of primitives for building “cluster” features into a distributed system. Examples are leadership election, consistent storage of cluster state, global locks, and one-time tokens.
Messaging
- Spring Cloud Bus: links the nodes of a distributed system with a lightweight message broker (with AMQP and Kafka broker implementations).
- Spring Cloud Open Service Broker & Spring Cloud App Broker: a framework for building Spring Boot applications that implement the Open Service Broker API.
- Spring Cloud Stream: supports a variety of binder implementations with RabbitMQ, Kafka, Kinesis, Google PubSub, Solace and more.
- Spring Cloud Zookeeper: provides Apache Zookeeper integrations for Spring Boot apps through autoconfiguration
To conclude, the ecosystem with the Spring framework has been evolving rapidly and the maturity in the industry has enabled it to be accepted as a production-ready and proven solution. Leveraging libraries, frameworks, tools, and technologies available within the Spring framework helps build consistency in an enterprise application while there are alternative choices available.
Feel free to share your feedback/perspective as comments.